import axios from 'axios';

const instance = axios.create({
  baseURL: 'http://bundle.hanxiaoxin.cn:1234/api',
  withCredentials: true,
  timeout: 10000
});

// 添加请求拦截器
axios.interceptors.request.use(function (config) {
  return config;
}, function (error) {
  console.log(error)
  return Promise.reject(error);
});

// 添加响应拦截器
axios.interceptors.response.use(function (response) {
  return response;
}, function (error) {
  return Promise.reject(error);
});

export default instance;